var char = 'A';
var maxCols = 29;
var rows=1+(maxCols-1)/2;
for(var i = 0; i< rows;i++){
	var result="";
	for(var j=0;j<maxCols;j++){
		result+=i==rows-1?char:(j==rows-i-1||j==rows+i-1?char:" ");
	}
	console.log(result);
}